package com.enjoy.game.xcard.sprite;

import org.andengine.entity.Entity;
import org.andengine.entity.IEntity;
import org.andengine.entity.scene.ITouchArea;
import org.andengine.entity.scene.Scene;

import android.view.DragEvent;


public class ExEntityUtil{

	
	static public void onAttachScene(Scene scene, IEntity  entity) {
		if(entity instanceof ITouchArea){
			scene.registerTouchArea((ITouchArea)entity);
		}

		int count = entity.getChildCount();
		for(int i = 0; i < count; i++){
			IEntity child = entity.getChildByIndex(i);
			if(child instanceof IExEntity){
				((IExEntity) child).onAttachScene(scene);
			}
		}
	}

	
	static public boolean canAcceptDrag(IEntity entity) {
		// TODO Auto-generated method stub
		return false;
	}

	static public boolean dispatchDragEvent(EntityDragEvent event, IEntity entity) {
		// TODO Auto-generated method stub
		return false;
	}
	
}
